﻿using System;
using System.Collections.Generic;

namespace Matrix.MaKaYunShang.Model.Dto
{
    /// <summary>
    /// 订单信息 FOR WEB
    /// </summary>
    public class OuterOrderDto
    {
        /// <summary>
        /// 订单基础信息
        /// </summary>
        public BaseOrder BaseOrderInfo { get; set; }

        /// <summary>
        /// 订单详情列表
        /// </summary>
        public List<OrderDetailInfo> OrderDetailList { get; set; }

        /// <summary>
        /// 订单优惠券详情列表
        /// </summary>
        public List<OrderCoupon> OrderCouponList { get; set; }

        /// <summary>
        /// 订单编号
        /// </summary>
        public string OrderNo { get; set; }

        /// <summary>
        /// 订单ID
        /// </summary>
        public int OrderId { get; set; }
    }

    public class BaseOrder
    {
        /// <summary>
        /// 订单标题
        /// </summary>		
        public string OrderTitle { get; set; }
        /// <summary>
        /// 订单所属店铺
        /// </summary>		
        public int ShopId { get; set; }
        
        /// <summary>
        /// 店铺顾客编号
        /// </summary>		
        public string ShopCustomerNumber { get; set; }
        /// <summary>
        /// 原有定水电话
        /// </summary>		
        public string OldOrderPhone { get; set; }
        /// <summary>
        /// 实际付款
        /// </summary>		
        public decimal PayPrice { get; set; }
        /// <summary>
        /// 折扣后价格
        /// </summary>		
        public decimal DiscountPrice { get; set; }
        /// <summary>
        /// 折扣前价格
        /// </summary>		
        public decimal NormalPrice { get; set; }
        /// <summary>
        /// 随机立减金额
        /// </summary>		
        public decimal RandomPayDiscount { get; set; }
        /// <summary>
        /// 优惠券ID
        /// </summary>		
        public int CouponId { get; set; }
        /// <summary>
        /// 优惠券抵扣价格
        /// </summary>		
        public decimal CouponValue { get; set; }
        /// <summary>
        /// 订单支付方式
        /// </summary>		
        public int PayWay { get; set; }
        /// <summary>
        /// 收件人
        /// </summary>		
        public string ReceiverName { get; set; }
        /// <summary>
        /// 收件人电话
        /// </summary>		
        public string ReceiverPhone { get; set; }
        /// <summary>
        /// 收件人地址
        /// </summary>		
        public string ReceiverAddress { get; set; }
        /// <summary>
        /// 订单备注
        /// </summary>		
        public string Remark { get; set; }
        /// <summary>
        /// 下单用户Id
        /// </summary>		
        public int ConsumerId { get; set; }
        /// <summary>
        /// 下单用户名称/微信昵称(非必填)
        /// </summary>		
        public string ConsumerName { get; set; }
        /// <summary>
        /// ConsumerSendTime
        /// </summary>		
        public string ConsumerSendTime { get; set; }
        /// <summary>
        /// 订单所关联的分享令牌
        /// </summary>		
        public string ShareToken { get; set; }
        /// <summary>
        /// 经度
        /// </summary>		
        public string Longitude { get; set; }
        /// <summary>
        /// 纬度
        /// </summary>		
        public string Latitude { get; set; }
        /// <summary>
        /// 下单时IP
        /// </summary>		
        public string IpAddress { get; set; }

        /// <summary>
        /// 下单时间
        /// </summary>		
        public DateTime OrderTime { get; set; }
        /// <summary>
        /// 订单所属店铺名字
        /// </summary>		
        public string ShopName { get; set; }
        /// <summary>
        /// 订单编号
        /// </summary>
        public string OrderNo { get; set; }

        /// <summary>
        /// 订单ID
        /// </summary>
        public int OrderId { get; set; }
        /// <summary>
        /// 订单状态
        /// </summary>
        public int OrderStatus { get; set; }
        /// <summary>
        /// 是否支付完成
        /// </summary>		
        public bool IsPayCompleted { get; set; }
        /// <summary>
        /// 线上支付订单记录ID
        /// </summary>		
        public int PaySerialId { get; set; }
        /// <summary>
        /// 是否为平台订单
        /// </summary>		
        public bool IsPlatformOrder { get; set; }  
        /// <summary>
        /// IsEndingAfterPaid
        /// </summary>		
        public bool IsEndingAfterPaid { get; set; }
        /// <summary>
        /// ConsumerOrderType
        /// </summary>		
        public int ConsumerOrderType { get; set; }
        /// <summary>
        /// 此订单是否已评论
        /// </summary>		
        public bool IsCommented { get; set; }
        /// <summary>
        /// 该订单是否可提现
        /// </summary>		
        public bool CanWithdraw { get; set; }
        /// <summary>
        /// 是否仅单独下单 
        /// </summary>		
        public bool IsOnlySingle { get; set; }
        /// <summary>
        /// 是否总部发货
        /// </summary>		
        public bool IsHeadquartersSend { get; set; }
        /// <summary>
        /// 店铺是否可见该商品订单 //如果是则才能提现 否则不能提现
        /// </summary>		
        public bool IsShopCanView { get; set; }
    }

    /// <summary>
    ///OrderDetail
    /// </summary>
    public class OrderDetailInfo
    {
        /// <summary>
        /// 店铺商品ID
        /// </summary>		
        public int ShopCommodityId { get; set; }
        /// <summary>
        /// 购买数量
        /// </summary>		
        public int Quantity { get; set; }
        /// <summary>
        /// 是否为赠品
        /// </summary>		
        public bool IsGift { get; set; }
        /// <summary>
        /// 购买时支付价格
        /// </summary>		
        public decimal Price { get; set; }
        /// <summary>
        /// 购买时商品名称
        /// </summary>		
        public string CommodityName { get; set; }
        /// <summary>
        /// 购买时商品品牌
        /// </summary>		
        public string CommodityBrand { get; set; }
        /// <summary>
        /// CommodityCateName
        /// </summary>		
        public string CommodityCateName { get; set; }
        /// <summary>
        /// 购买时商品规格
        /// </summary>		
        public string CommoditySpec { get; set; }
        /// <summary>
        /// 购买时商品数量单位
        /// </summary>		
        public string CommodityUnit { get; set; }
        /// <summary>
        /// 购买时商品LOGO
        /// </summary>		
        public string CommodityLogo { get; set; }
        /// <summary>
        /// 商品库ID
        /// </summary>		
        public int CommodityLibId { get; set; }
        /// <summary>
        /// 购买时商品建议零售价
        /// </summary>		
        public decimal CommoditySuggestedPrice { get; set; }
        /// <summary>
        /// 礼品所属商品库ID
        /// </summary>		
        public int GiftBelongToCommodityLibId { get; set; }
        /// <summary>
        /// 购买时商品条形码
        /// </summary>		
        public string CommodityBarCode { get; set; }
        /// <summary>
        /// 购买时赠品ID
        /// </summary>		
        public int CommodityGiftId { get; set; }
        /// <summary>
        /// 商家提成佣金
        /// </summary>
        public decimal ShopCommission { get; set; }
    }

    /// <summary>
    /// 订单列表 FOR WEB
    /// </summary>
    public class OuterOrderListDto
    {
        /// <summary>
        /// 订单列表
        /// </summary>
        public List<OuterOrderDto> OrderList { get; set; }

        /// <summary>
        /// 分页页码
        /// </summary>
        public int PageIndex { get; set; }

        /// <summary>
        /// 总页数
        /// </summary>
        public int PageAmount { get; set; }

        /// <summary>
        /// 订单总数
        /// </summary>
        public int TotalOrderAmount { get; set; }
    }

    
}
